package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.system.entity.AbdulBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

/**
 * 入库单 Entity
 *
 * @author ruoyi
 * @date 2025-06-04
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel("门店入库单信息")
@Data
@TableName("inv_warehousing_entry")
public class WarehousingEntry extends AbdulBaseEntity {

    @ApiModelProperty(value = "主键ID", example = "1")
    private Long id;

    @ApiModelProperty(value = "入库仓库ID（关联 warehouse 表）", required = true, example = "1001")
    private Long warehouseId;

    @ApiModelProperty(value = "入库类型")//绑定表store_business的id
    private Long storeBusinessId;

    @ApiModelProperty(value = "入库单号", example = "1001")
    private String code;

    @ApiModelProperty("操作类型（1-入库 2-出库）")
    private Integer isType;

    @ApiModelProperty(value = "出入库时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date inOutTime;
    //DTO
    @ApiModelProperty(value = "入库明细信息")
    @TableField(exist = false)
    List<InventoryDetails> inventoryDetails;

    @ApiModelProperty(value = "创建开始时间")
    @TableField(exist = false)
    private Date createTimeStart;

    @ApiModelProperty(value = "创建结束时间")
    @TableField(exist = false)
    private Date createTimeEnd;

    @ApiModelProperty(value = "出入库类型名称")
    @TableField(exist = false)
    private String storeBusinessName;
}
